<?php

use Encore\Admin\Form;
use Encore\Admin\Grid;
use App\Admin\Extensions\Form\Simplemde;

Form::forget(['map', 'editor']);

Form::extend('editor', Simplemde::class);

//app('view')->prependNamespace('admin', resource_path('views/admin'));

Grid::init(function (Grid $grid) {
    $grid->expandFilter();
    $grid->disableExport();

    $grid->filter(function(Grid\Filter $filter){
        $filter->disableIdFilter();
    });

    $grid->actions(function (Grid\Displayers\Actions $actions) {
        $actions->disableView();
    });

});

Form::init(function (Form $form) {
    $form->disableCreatingCheck()->disableEditingCheck()->disableViewCheck();

    $form->tools(function (Form\Tools $tools) {
        $tools->disableDelete();
        $tools->disableView();
    });
});